package com.base.grammardemo;

class People {
	private String name;
	private int age;

	public People(String _name, int _age) {
		this.name = _name;
		this.age = _age;
	}
	
	public People(){
		System.out.println("无参数构造方法");
	}

	/**
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            要设置的 name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return age
	 */
	public int getAge() {
		return age;
	}

	/**
	 * @param age
	 *            要设置的 age
	 */
	public void setAge(int age) {
		this.age = age;
	}

	public void tell() {
		System.out.println("姓名:" + this.getName() + " 年龄:" + this.getAge());
	}
}

public class ThisDemo {
	public static void main(String[] args) {
		People p=new People();
		
	}
}